import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/views/layout/Layout'

const _import = require('./_import_' + process.env.NODE_ENV)

Vue.use(Router)

export const routerMap = [
	{ path: '/login', component: _import('login/index'), hidden: true },
	{
		path: '/sequence',
		component: Layout,
		name: '序列管理',
		redirect: '/sequence/sequence',
		children: [
			{ path: 'sequence', name: '序列管理', component: _import('sequence/sequence') },
			{ path: 'apply', name: '全局序列申请', component: _import('sequence/apply') },
			{ path: 'applyCheck', name: '序列申请审批', component: _import('sequence/sequenceApplyCheck') }
		]
	},
	{ path: '*', redirect: '/sequence/sequence', hidden: true }
]

export default new Router({
	routes: routerMap
})
